package com.zhx.threadcoreknowledge.synchromized;

/**
 * @author ：zhanghaixuan
 * @date ：Created in 2019-10-02 11:36
 * 用途         ： 可重入粒度测试3: 调用父类的方法
 */
public class SynchronizedSuperClass12 {

    public synchronized void doSomething(){
        System.out.println("我是父类方法");
    }

    public static void main(String[] args) {
        TestClass recursion10 = new TestClass();
        recursion10.doSomething();
    }
}


class TestClass extends SynchronizedSuperClass12{
    @Override
    public synchronized void doSomething() {
        System.out.println("我是子类方法");
        super.doSomething();
    }
}
